package com.zhouyu;

interface A{
	void solve(int num);
}

class C{
	int num;

	A a;

	public C(int num, A a) {
		this.num = num;
		this.a = a;
	}


	public void run(){
		a.solve(this.num);
	}

}

class B{
	public void print(){
		System.out.println("bbbbbbb");
	}
}

public class Test2 {
	public C c = null;


	public void test(){
		B b = new B();
		c = new C(1, new A() {
			@Override
			public void solve(int num) {
				b.print();
				System.out.println("solve:" + num * 2);
			}
		});
		c.run();
	}

	public static void main(String[] args) {
		Test2 test = new Test2();

		test.test();


		test.c.run();

	}
}
